#ifndef ACCEPTOR_H
#define ACCEPTOR_H

#include "Socket.h"
#include "InetAddress.h"
#include "TcpConnect.h"

class Acceptor
{
private:
    Socket _sock;
    InetAddress _inet;

public:
    Acceptor(const char *ip, unsigned short port);
    ~Acceptor();
    void init();
    void setReuseIp();
    void setReusePort();
    void bind();
    void listen();
    int accept();
};

#endif